package com.example.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.mapper.FoodManagementMapper;
import com.example.domain.FoodManagement;
import com.example.service.IFoodManagementService;

/**
 * 菜品汇总Service业务层处理
 * 
 * @author 何曼伶
 * @date 2024-09-13
 */
@Service
public class FoodManagementServiceImpl implements IFoodManagementService 
{
    @Autowired
    private FoodManagementMapper foodManagementMapper;

    /**
     * 查询菜品汇总
     * 
     * @param id 菜品汇总主键
     * @return 菜品汇总
     */
    @Override
    public FoodManagement selectFoodManagementById(Long id)
    {
        return foodManagementMapper.selectFoodManagementById(id);
    }

    /**
     * 查询菜品汇总列表
     * 
     * @param foodManagement 菜品汇总
     * @return 菜品汇总
     */
    @Override
    public List<FoodManagement> selectFoodManagementList(FoodManagement foodManagement)
    {
        return foodManagementMapper.selectFoodManagementList(foodManagement);
    }

    /**
     * 新增菜品汇总
     * 
     * @param foodManagement 菜品汇总
     * @return 结果
     */
    @Override
    public int insertFoodManagement(FoodManagement foodManagement)
    {
        return foodManagementMapper.insertFoodManagement(foodManagement);
    }

    /**
     * 修改菜品汇总
     * 
     * @param foodManagement 菜品汇总
     * @return 结果
     */
    @Override
    public int updateFoodManagement(FoodManagement foodManagement)
    {
        return foodManagementMapper.updateFoodManagement(foodManagement);
    }

    /**
     * 批量删除菜品汇总
     * 
     * @param ids 需要删除的菜品汇总主键
     * @return 结果
     */
    @Override
    public int deleteFoodManagementByIds(Long[] ids)
    {
        return foodManagementMapper.deleteFoodManagementByIds(ids);
    }

    /**
     * 删除菜品汇总信息
     * 
     * @param id 菜品汇总主键
     * @return 结果
     */
    @Override
    public int deleteFoodManagementById(Long id)
    {
        return foodManagementMapper.deleteFoodManagementById(id);
    }
}
